package com.ykq.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ykq.core.entity.Dept;
import com.ykq.core.vo.R;
import com.ykq.system.mapper.DeptMapper;
import com.ykq.system.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: 闫克起
 * @Description:
 * @Date: Create in 8:58 2024/8/14
 */
@Service
public class DeptServiceImpl implements DeptService {
    @Autowired
    private DeptMapper deptMapper;
    @Override
    public R<List<Dept>> selectAll() {
        //条件类
        QueryWrapper<Dept> wrapper=new QueryWrapper<>();
        wrapper.eq("status",0);
        wrapper.eq("del_flag",0);
        List<Dept> depts = deptMapper.selectList(wrapper);
        return R.ok(depts);
    }
}
